package com.aclass.xqx.classscreen.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.aclass.xqx.classscreen.R;
import com.bumptech.glide.Glide;
import com.zhouwei.mzbanner.holder.MZViewHolder;

/**
 * Created by xqx on 2017/11/14.
 * 轮播图adapter
 */

public class BannerPaddingViewHolder implements MZViewHolder<String> {

        private ImageView mImageView;
        @Override
        public View createView(Context context) {
            // 返回页面布局文件
            View view = LayoutInflater.from(context).inflate(R.layout.banner_item_padding,null);
            mImageView = (ImageView) view.findViewById(R.id.banner_image);
            return view;
        }

    @Override
    public void onBind(Context context, int i, String s) {
//        mImageView.setImageResource(data);
        Glide.with(context).load(s).into(mImageView);
    }

}
